home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / GSXSAM.ZIP;1 / NOSIZE.PRG < prev    next >
Encoding:
Text File  |  1993-07-27  |  2.3 KB  |  66 lines

  1. ***************************************************************************
  2. *
  3. * Procedure file: NOSIZE.PRG
  4. *         System: GenScrnX
  5. *        Version: 1.1
  6. *         Author: Ken R. Levy
  7. *        Company: Jet Propulsion Laboratory
  8. *      Copyright: None (Public Domain)
  9. *
  10. ***************************************************************************
  11. *
  12. * NOSIZE - No SIZE clause driver.
  13. *
  14. * Description:
  15. * This program is used as an optional driver for use with GENSCRNX.PRG.
  16. *
  17. * Features:
  18. * Removes SIZE clause from all objects.
  19. *
  20. * Notes:
  21. * In this program, for clarity/readability reasons, variable names
  22. * are used that are longer than 10 characters.  Note, however, that only
  23. * the first 10 characters are significant.
  24. *
  25. * Important:
  26. * Function calls made from this program may be contained in GENSCRNX.PRG.
  27. * Variable names not declared PRIVATE in this program defined PRIVATE in
  28. * GENSCRNX.PRG.
  29. *
  30. PRIVATE m.at_line,m.at_pos,m.i,m.memline
  31.  
  32. * Ignore for header record or driver disable mode.
  33. IF OBJTYPE=1.AND..NOT.drvenable(PROGRAM())
  34.   GOTO BOTTOM
  35.   RETURN .F.
  36. ENDIF
  37.  
  38. * Skip objects that do not generate a SIZE clause.
  39. IF .NOT.drvobj().OR.(OBJTYPE#5.AND..NOT.BETWEEN(OBJTYPE,11,17))
  40.   RETURN .F.
  41. ENDIF
  42.  
  43. * If object's Comment snippet containes the *:SIZE directive, do not
  44. * add the *:NOSIZE directive.  Note that the wordsearch function is used
  45. * to parse the given <expC>.  If the second parameter passed to the
  46. * wordsearch() function is a .T., the Setup snippet is parsed rather than
  47. * the Comment snippet.
  48. IF .NOT.wordsearch(m.c_size)==m.null
  49.   RETURN .F.
  50. ENDIF
  51.  
  52. * If object is not a GET/EDIT or the Comment snippet contains *:INSOBJ,
  53. * *:INSSCX, or *:INSTXT directives, skip adding *:NOSIZE directive.
  54. IF (OBJTYPE#5.AND.OBJTYPE#15).OR..NOT.wordsearch(m.c_instxt)==m.null.OR.;
  55.    .NOT.wordsearch(m.c_insobj)==m.null.OR.;
  56.    .NOT.wordsearch(m.c_insscx)==m.null
  57.   RETURN .F.
  58. ENDIF
  59.  
  60. * Add the *:NOSIZE clause to objects Comment snippet by calling the size1()
  61. * function in GENSCRNX with no parameters.  Note that a <expC> parameter was
  62. * passed to the size1() function, the *:SIZE <expC> directive would be added
  63. * the objects Comment snippet.  The size1() function is used to add both the
  64. * *:SIZE <expC> directive and the *:NOSIZE directive.
  65. RETURN size1()
  66.